var win = Titanium.UI.createWindow({
  backgroundColor:"black"
});
 var tableview = Titanium.UI.createTableView({
  data:[ 
    { leftImage:'', title:"Child1", hasChild:true, color:"white", test:'first.js'},
    { leftImage:'', title:"Child2", hasChild:true, color:"white", test:'second.js'},
    { leftImage:'', title:"ALL", hasChild:true, color:"white", test:'all.js'},
    { leftImage:'', title:"CreateNew", hasChild:true, color:"create.js" }
  ]});


win.add(tableview);


win.open();

tableview.addEventListener('click', function(e)
{
  if (e.rowData.test)
  {
    var win2 = Titanium.UI.createWindow({
      url:e.rowData.test,
      title:e.rowData.title
    });
    win.hide();
    win2.open({animated:true});
  }
});